<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <title>财富管理中心</title>
  <!-- Tell the browser to be responsive to screen width -->
  <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
  <#include "public/css.ftl">
</head>
<body class="hold-transition skin-blue sidebar-mini">
<#include "public/tip.ftl">
<div class="wrapper">
  <#include "public/header.ftl">
  <!-- Left side column. contains the logo and sidebar -->
  <#include "public/aside.ftl">
  <!-- Content Wrapper. Contains page content -->
  <div class="content-wrapper">
    <!-- Content Header (Page header) -->
    <section class="content-header">
      <h1>
        Data Tables
        <small>advanced tables</small>
      </h1>
      <ol class="breadcrumb">
        <li><a href="#"><i class="fa fa-dashboard"></i> 首页</a></li>
        <li class="active">#</li>
        <li class="active">#</li>
      </ol>
    </section>

    <!-- Main content -->
    <section class="content"> 
      <div class="row">
        <div class="col-xs-12"> 
          <div class="box">
            <div class="box-header">
              <h3 class="box-title">信用卡卡种</h3>

            </div>
            <div class="box-body">
                <div id="toolbar">
                    <div class="form-inline" role="form">
                        <a class="btn btn-app" onclick="showAddCardTypeModel(-1)">
                            <i class="fa fa-plus"></i> 新增
                        </a>
                    </div>
                </div>
                <table id="creditCardTypeTable" data-toggle="table" data-url="/creditcardtype/list"  data-toolbar="#toolbar"
                       class=".table-responsive table text-nowrap" data-query-params="queryParams" data-search="true"
                       data-pagination="true" data-sort-name="totalAmount" data-sort-order="desc">
                    <thead>
                    <tr>
                        <th data-field="bankName">银行名称</th>
                        <th data-field="name" data-formatter="showCard">卡种名称</th>
                        <th data-field="annualFee">年费</th>
                        <th data-field="img">卡样图片</th>
                    </tr>
                    </thead>
                </table>
            </div>
          </div>
          <!-- /.box -->
        </div>
        <!-- /.col -->
      </div>
      <!-- /.row -->
    </section>
    <!-- /.content -->
  </div>
  <!-- /.content-wrapper -->
<#include "public/footer.ftl" >
  <div class="control-sidebar-bg"></div>
</div>
<#include "public/js.ftl" >
<#include "cardtype/addcardtype.ftl" >
<script>
    function showCard(value,row,index){
        // return "<a href='javascript:showAddCardTypeModel("+index+");'>"+value+"</a>"
        return "<a href='javascript:void(0)' onclick='showAddCardTypeModel("+index+")'>" + value + "</a>"

    }
    function showAddCardTypeModel(index) {
        addCardTypeModel_init();
        addCardTypeModel_setValue(index) ;
        $("#addCardTypeModel").modal("show");
    }
</script>
</body>
</html>
